package com.zdkj.subway.support.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zdkj.common.core.constant.CommonConstants;
import com.zdkj.common.core.util.R;
import com.zdkj.common.log.annotation.SysLog;
import com.zdkj.subway.support.entity.SwPmWorkotherDataType;
import com.zdkj.subway.support.service.SwPmWorkOtherDataTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 其他相关数据数据类型参数表
 *
 * @author cheng
 * @date 2021-05-06 14:16:07
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/swpmworkotherdatatype")
@Api(value = "swpmworkotherdatatype", tags = "其他相关数据数据类型参数表(数据类型)")
public class SwPmWorkOtherDataTypeController {

    private final SwPmWorkOtherDataTypeService swPmWorkOtherDataTypeService;
    /**
     * 主类型数据类型参数字典
     *
     * @return
     */
    @ApiOperation(value = "主类型数据类型参数字典", notes = "主类型数据类型参数字典")
    //@SysLog("主类型数据类型参数字典")
    @GetMapping("/dict")
    public R getDict() {
        return R.ok(swPmWorkOtherDataTypeService.getBaseMapper().selectList(
                Wrappers.<SwPmWorkotherDataType>lambdaQuery().eq(SwPmWorkotherDataType::getStatus, CommonConstants.ENABLE)));
    }
}
